package com.base.pd.agent;

public class AgentTF2T extends Agent {
	
	private boolean otherPrevious=true;
	private boolean otherPrePrevious=true;

	public AgentTF2T() {
		super("Tit for 2 Tats", "Batt");
	}

	@Override
	public boolean cooperate() {
		return (otherPrevious&otherPrePrevious);
	}

	@Override
	public void update(int round, boolean myMove, boolean otherMove,
			int myScore, int otherScore) {
		otherPrePrevious = otherPrevious;
		otherPrevious = otherMove;
	}

	@Override
	public void init() {
		otherPrevious=true;
		otherPrePrevious=true;
	}

}
